
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Scanner;



    public class Admin {
        public void LoginPassword() {
            String reservedUsername = "admin";
            String reservedPassword = "ynuinfo#777";
            String newPassword = "jgx5201314";
            Scanner scanner = new Scanner(System.in);
            System.out.println("请输入管理员用户");
            String username = scanner.nextLine();
            System.out.println("请输入密码：");
            String password = scanner.nextLine();
            if (username.equals(reservedUsername) && password.equals(reservedPassword)) {
                System.out.println("登录成功");
            } else {
                System.out.println("输入有误，请重新登陆");
            }

            System.out.println("请输入管理员用户");
            String newusername = scanner.nextLine();
            System.out.println("请修改并输入新密码：");
            String newpassword = scanner.nextLine();
            if (username.equals(reservedUsername) && newpassword.equals(newPassword)) {
                System.out.println("登录成功");
            } else {
                System.out.println("输入有误，请重新登陆");
            }

        }








        public static class CustomerManagement {
            //  ID、用户名、用户级别（金牌客户、银牌客户、铜牌客户）、用户注册时间、用户消费金额、用户手机号、用户邮箱；
            private String id;
            private String username;
            private String grade;
            private String RegistrationTime;
            private String SpendAmount;
            private String PhoneNumber;
            private String mailbox;

            public CustomerManagement() {





            }

            public CustomerManagement(String id, String username, String grade, String RegistrationTime, String SpendAmount, String PhoneNumber, String mailbox) {
                this.id = id;
                this.username = username;
                this.grade = grade;
                this.RegistrationTime = RegistrationTime;
                this.SpendAmount = SpendAmount;
                this.PhoneNumber = PhoneNumber;
                this.mailbox = mailbox;
            }


            /**
             * 获取
             *
             * @return id
             */
            public String getId() {
                return id;
            }

            /**
             * 设置
             *
             * @param id
             */
            public void setId(String id) {
                this.id = id;
            }

            /**
             * 获取
             *
             * @return username
             */
            public String getUsername() {
                return username;
            }

            /**
             * 设置
             *
             * @param username
             */
            public void setUsername(String username) {
                this.username = username;
            }

            /**
             * 获取
             *
             * @return grade
             */
            public String getGrade() {
                return grade;
            }

            /**
             * 设置
             *
             * @param grade
             */
            public void setGrade(String grade) {
                this.grade = grade;
            }

            /**
             * 获取
             *
             * @return RegistrationTime
             */
            public String getRegistrationTime() {
                return RegistrationTime;
            }

            /**
             * 设置
             *
             * @param RegistrationTime
             */
            public void setRegistrationTime(String RegistrationTime) {
                this.RegistrationTime = RegistrationTime;
            }

            /**
             * 获取
             *
             * @return SpendAmount
             */
            public String getSpendAmount() {
                return SpendAmount;
            }

            /**
             * 设置
             *
             * @param SpendAmount
             */
            public void setSpendAmount(String SpendAmount) {
                this.SpendAmount = SpendAmount;
            }

            /**
             * 获取
             *
             * @return PhoneNumber
             */
            public String getPhoneNumber() {
                return PhoneNumber;
            }

            /**
             * 设置
             *
             * @param PhoneNumber
             */
            public void setPhoneNumber(String PhoneNumber) {
                this.PhoneNumber = PhoneNumber;
            }

            /**
             * 获取
             *
             * @return mailbox
             */
            public String getMailbox() {
                return mailbox;
            }

            /**
             * 设置
             *
             * @param mailbox
             */
            public void setMailbox(String mailbox) {
                this.mailbox = mailbox;
            }


            public String toString() {
                return "CustomerManagement{id = " + id + ", username = " + username + ", grade = " + grade + ", RegistrationTime = " + RegistrationTime + ", SpendAmount = " + SpendAmount + ", PhoneNumber = " + PhoneNumber + ", mailbox = " + mailbox + "}";
            }
        }

        public static class Store {
            //定义变量商品编号、商品名称、生产厂家、生产日期、型号、进货价、零售价格、数量。
            private String id;//编号
            private String name;//名称
            private String address;//厂家
            private String productiondate;//生产日期
            private String Model;//型号
            private String Incomingprice;//进货价
            private String Retailprice;//零售价
            private String number ;//数量

            public Store(String id, String name, String address, String productiondate, String Model, String Incomingprice, String Retailprice, String number) {
                this.id = id;
                this.name = name;
                this.productiondate = productiondate;
                this.address = address;
                this.Model = Model;
                this.Incomingprice = Incomingprice;
                this.Retailprice = Retailprice;
                this.number = number;
            }


            public Store() {
            }

            /**
             * 获取
             *
             * @return id
             */
            public String getId() {
                return id;
            }

            /**
             * 设置
             *
             * @param id
             */
            public void setId(String id) {
                this.id = id;
            }

            /**
             * 获取
             *
             * @return name
             */
            public String getName() {
                return name;
            }

            /**
             * 设置
             *
             * @param name
             */
            public void setName(String name) {
                this.name = name;
            }

            /**
             * 获取
             *
             * @return address
             */
            public String getAddress() {
                return address;
            }

            /**
             * 设置
             *
             * @param address
             */
            public void setAddress(String address) {
                this.address = address;
            }

            /**
             * 获取
             *
             * @return productiondate
             */
            public String getProductiondate() {
                return productiondate;
            }

            /**
             * 设置
             *
             * @param productiondate
             */
            public void setProductiondate(String productiondate) {
                this.productiondate = productiondate;
            }

            /**
             * 获取
             *
             * @return Model
             */
            public String getModel() {
                return Model;
            }

            /**
             * 设置
             *
             * @param Model
             */
            public void setModel(String Model) {
                this.Model = Model;
            }

            /**
             * 获取
             *
             * @return Incomingprice
             */
            public String getIncomingprice() {
                return Incomingprice;
            }

            /**
             * 设置
             *
             * @param Incomingprice
             */
            public void setIncomingprice(String Incomingprice) {
                this.Incomingprice = Incomingprice;
            }

            /**
             * 获取
             *
             * @return Retailprice
             */
            public String getRetailprice() {
                return Retailprice;
            }

            /**
             * 设置
             *
             * @param Retailprice
             */
            public void setRetailprice(String Retailprice) {
                this.Retailprice = Retailprice;
            }

            /**
             * 获取
             *
             * @return number
             */
            public String getNumber() {
                return number;
            }

            /**
             * 设置
             *
             * @param number
             */
            public void setNumber(String number) {
                this.number = number;
            }

            public String toString() {
                return "Store{id = " + id + ", name = " + name + ", address = " + address + ", productiondate = " + productiondate + ", Model = " + Model + ", Incomingprice = " + Incomingprice + ", Retailprice = " + Retailprice + ", number = " + number + "}";
            }
        }

    }

